package com.ibm.test.ribbon.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class HelloRemote {

	@Autowired
	RestTemplate restTemplate;
	@Value("${applicatoin.hello.name}")
	String helloServiceId;

	public String hello(String name) {
		return restTemplate.getForObject("http://" + helloServiceId + "/hello?name=" + name, String.class);
	}

}
